<?php
require_once '../php_lib/conexion.php';

$campo = 'ima_blob';

$query = mysql_query("SELECT $campo FROM `Imagen` WHERE ima_id=".$_GET['ima_id']);
$data = mysql_fetch_array($query);

header('Content-type: image/jpg');

echo $data[$campo];

?>